<?php

namespace Home\Controller;

use Think\Controller;
use Think\Page;

class GoodsController extends Controller
{
    function searchGoodsList()
    {
        $goods=D('goods');
        $goodscount = $goods->count();
        $page=new Page($goodscount,9);
        $goodslist = $goods->where(array('goodsisdel'=>0))->limit($page->firstRow.','.$page->listRows)->select();
        $pageshow = $page->show();
        $this->assign('goodslist',$goodslist);
        $this->assign('show',$pageshow);
        $this->display('goods/goodslist');
    }
    function searchGoodsTypeList(){
        $type=D('type');
        $typecount = $type->count();
        $page=new Page($typecount,9);
        $typelist = $type->limit($page->firstRow.','.$page->listRows)->select();
        $pageshow = $page->show();
        $this->assign('goodslist',$typelist);
        $this->assign('show',$pageshow);
        $this->display('goods/typelist');
    }

}
